nodeparser: Print debug message before child
authorMatthias Clasen <mclasen@redhat.com>
Tue, 9 Mar 2021 05:43:47 +0000 (00:43 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 9 Mar 2021 17:15:25 +0000 (12:15 -0500)
This puts the message up top, where it can be seen,
and not at the other end of an endless tree of children.

Update tests to match.

gsk/gskrendernodeparser.c
testsuite/gsk/nodeparser/debug.node

index 8d72f94aa19ee5cedcd5af3038ce8d921869a394..dce4a33f36a04a0aab4045bcfba04882ec72bbe5 100644 (file)
@@ -2767,13 +2767,13 @@ render_node_print (Printer       *p,
 
         start_node (p, "debug");
 
-        append_node_param (p, "child", gsk_debug_node_get_child (node));
         /* TODO: We potentially need to escape certain characters in the message */
         if (message)
           {
             _indent (p);
             g_string_append_printf (p->str, "message: \"%s\";\n", message);
           }
+        append_node_param (p, "child", gsk_debug_node_get_child (node));
 
         end_node (p);
       }
index cd68defd5261b8850371abdcb9236e0a31e5390a..978d3e83a068441a9111f0f96061bf8d0c034b0e 100644 (file)
@@ -1,5 +1,5 @@
 debug {
+  message: "I'm a debug node.";
   child: container {
   }
-  message: "I'm a debug node.";
 }